package com.stars.home.adapter

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.google.gson.Gson
import com.qmuiteam.qmui.kotlin.onClick
import com.stars.home.R
import com.stars.home.activity.*
import com.stars.home.databinding.ItemBillToBinding
import com.stars.home.model.MemberList
import com.stars.home.model.TrMsgList
import com.stars.home.vmodel.BillVModel
import com.trailer.base.base.BAdapter
import com.trailer.base.utils.B
import com.trailer.base.utils.UiSwitch

class BillToAdapter(var vm: BillVModel) : BAdapter<MemberList, BaseDataBindingHolder<ItemBillToBinding>>(R.layout.item_bill_to) {

    override fun convert(holder: BaseDataBindingHolder<ItemBillToBinding>, item: MemberList) {
        holder.dataBinding?.vm = vm
        holder.dataBinding?.item = item
        holder.dataBinding?.ll?.onClick {
            //账单明细
            UiSwitch.bundle(context(), BillDetailsActivity::class.java,B().putString("bean", Gson().toJson(item)).ok())
        }


    }
}
